norflash: Clear status register before sending commands
authorRoberto Vargas <[email protected]>
Wed, 26 Jul 2017 14:17:24 +0000 (15:17 +0100)
committerRoberto Vargas <[email protected]>
Tue, 22 Aug 2017 08:41:59 +0000 (09:41 +0100)
commitb4b09ca5676fed17ead90f3b0ff3b08b9176f85f
tree3eecf111c3ac46dac65dbc115cfa5eb471714245
parent9753cb5b51794dac43fc9c4eb474207ebf369b59
norflash: Clear status register before sending commands

The status register bits remain until explicitly cleared, which means
that a command can be incorrectly considered to have generated an error -
for example, after reset the status register contents may be unknown or
if a previous command had failed.

This patch clears the status register before beginning any command to
be sure that the status register only represents information about the
current operation.

Change-Id: I9e98110ee24179937215461c00b6543a3467b350
Signed-off-by: Roberto Vargas <[email protected]>
plat/arm/board/common/drivers/norflash/norflash.c